package com.ruoyi.review.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 评价对象 review
 * 
 * @author ruoyi
 * @date 2025-10-10
 */
public class Review extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评价ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 评价对象类型 */
    @Excel(name = "评价对象类型")
    private String entityType;

    /** 对象ID */
    @Excel(name = "对象ID")
    private Long entityId;

    /** 评分（1-5分） */
    @Excel(name = "评分", readConverterExp = "1=-5分")
    private Long score;

    /** 评价内容 */
    @Excel(name = "评价内容")
    private String content;

    /** 评价图片（逗号分隔） */
    @Excel(name = "评价图片", readConverterExp = "逗=号分隔")
    private String images;

    /** 评价时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评价时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reviewTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setEntityType(String entityType) 
    {
        this.entityType = entityType;
    }

    public String getEntityType() 
    {
        return entityType;
    }

    public void setEntityId(Long entityId) 
    {
        this.entityId = entityId;
    }

    public Long getEntityId() 
    {
        return entityId;
    }

    public void setScore(Long score) 
    {
        this.score = score;
    }

    public Long getScore() 
    {
        return score;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setImages(String images) 
    {
        this.images = images;
    }

    public String getImages() 
    {
        return images;
    }

    public void setReviewTime(Date reviewTime) 
    {
        this.reviewTime = reviewTime;
    }

    public Date getReviewTime() 
    {
        return reviewTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("entityType", getEntityType())
            .append("entityId", getEntityId())
            .append("score", getScore())
            .append("content", getContent())
            .append("images", getImages())
            .append("reviewTime", getReviewTime())
            .toString();
    }
}
